package com.ruoyi.web.controller.front;

import com.ruoyi.web.domain.ClasssicCasesDto;
import com.ruoyi.web.service.IClasssicCasesDtoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/home")
public class HomeController {
    @Autowired
    private IClasssicCasesDtoService classsicCasesService;
    /**
     * 进入网站首页
     */
    @GetMapping("/index")
    public String index(ModelMap mmap) {
        List<ClasssicCasesDto> classsicCasesList = classsicCasesService.selectClasssicCasesList(null);
        mmap.put("classsicCasesList", classsicCasesList);
        return "/home/home";
    }
}
